<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script src="./../jquery-1.12.4.js"></script>
    <script>
        let arr = [1, 3, 5, 7, 9];
        let obj = { 0: 1, 1: 3, 2: 5, length: 3 }
        /* arr.forEach(function (value, index) {
            console.log(value, index);
        })
        obj.forEach(function (value, index) {
            console.log(value, index);
        }) */
        $.each(arr, function (index, value) {
            console.log(index, value);
        })
        console.log('----------');
        $.each(obj, function (index, value) {
            console.log(index, value);
        })
    </script>
</head>

<body>

</body>

</html>